/**
 * Bestpay.com.cn Inc.
 * Copyright (c) 2011-2018 All Rights Reserved.
 */
package com.sgzn.sgpay.model.request;

/**
 * 公共请求类
 * @author zhongzhongyong
 * @version Id: CommonRequest.java, v 0.1 2018/4/1 16:20 zhongzhongyong Exp $$
 */
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;


public class CommonRequest implements Serializable {
    private static final long serialVersionUID = -449603975016674678L;

    @NotBlank(message = "请求流水号不能为空")
    @Length(max = 32, message = "请求流水号最大长度32位")
    private String initiationID;

    public CommonRequest() {
    }

    public String getInitiationID() {
        return this.initiationID;
    }

    public void setInitiationID(String initiationID) {
        this.initiationID = initiationID;
    }

    @Override
    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof CommonRequest)) {
            return false;
        } else {
            CommonRequest other = (CommonRequest) o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                String this$initiationID = this.getInitiationID();
                String other$initiationID = other.getInitiationID();
                if (this$initiationID == null) {
                    if (other$initiationID != null) {
                        return false;
                    }
                } else if (!this$initiationID.equals(other$initiationID)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof CommonRequest;
    }

    @Override
    public int hashCode() {
        boolean PRIME = true;
        byte result = 1;
        String $initiationID = this.getInitiationID();
        int result1 = result * 59 + ($initiationID == null ? 0 : $initiationID.hashCode());
        return result1;
    }

    @Override
    public String toString() {
        return "CommonRequest(initiationID=" + this.getInitiationID() + ")";
    }
}
